package com.example.controller;

import com.example.model.Order;
import com.example.service.OrderService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author long
 * @date 2022/11/30 15:12
 */
@RestController
@RequestMapping("/order")
public class OrderController {

    @Resource
    private OrderService orderService;

    /**
     * 创建订单
     * @param param
     * @return
     */
    @PostMapping("/createOrder")
    public String createOrder(@RequestBody Order param){
        return orderService.createOrder(param);
    }

}

